Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defer acclogp_assume!! and acclogp_observe!! to child context #574

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

torfjelde
Copy link
Member

Follow-up on #565: since acclogp_assume!! and acclogp_observe!! are meant to allow very fine control over how these logpdfs are accumulated, we should IMO try our best to find a context which overloads the behavior of acclogp_assume!! and acclogp_observe!! rather than just immediately going to the default assume!! (which is what do atm).

Hence this PR.

@coveralls
Copy link

coveralls commented Jan 29, 2024

Pull Request Test Coverage Report for Build 7697478498

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 13 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.04%) to 84.642%

Files with Coverage Reduction New Missed Lines %
src/model.jl 1 87.88%
src/threadsafe.jl 12 43.56%
Totals Coverage Status
Change from base Build 7634432110: 0.04%
Covered Lines: 2684
Relevant Lines: 3171

💛 - Coveralls

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c1d3636) 84.28% compared to head (9775e49) 84.32%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #574      +/-   ##
==========================================
+ Coverage   84.28%   84.32%   +0.03%     
==========================================
  Files          26       26              
  Lines        3175     3183       +8     
==========================================
+ Hits         2676     2684       +8     
  Misses        499      499              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@torfjelde torfjelde requested a review from devmotion January 30, 2024 10:51
Copy link
Member

@devmotion devmotion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, to me it seems we rather want the behaviour in this PR. Of course, would be nice to have tests for this behaviour but I imagine this could be a bit cumbersome to set up (e.g. by defining dummy contexts that allow us to trace the path of execution, e.g., by storing something in the context when a specific method is called...).

@torfjelde torfjelde enabled auto-merge February 2, 2024 10:05
@torfjelde torfjelde added this pull request to the merge queue Feb 2, 2024
Merged via the queue into master with commit c33eeae Feb 2, 2024
14 checks passed
@torfjelde torfjelde deleted the torfjelde/acclogp-improvements-2 branch February 2, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants